
#define INFINITY INT_MAX
#define MAX_VERTEX_NUM 20

typedef struct ArcNode 
{
	int adjvex;
	struct ArcNode *nextarc;
	int info;
}ArcNode,*ArcNodeList;

typedef struct VNode 
{
	char data;
	ArcNodeList firstarc;
}VNode,AdjList[MAX_VERTEX_NUM];

typedef struct  
{
	AdjList vertices;
	int vexnum,arcnum;
	int kind;
}ALGraph;

int LocateVex(ALGraph &G,char v);
void CreateALG(ALGraph &G);

void FindInDegree(ALGraph G,int indegree[]);
int TopologicalSort(ALGraph G);

int CriticalPath(ALGraph G);
